home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / plaf / basic / BasicIconFactory.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  2.0 KB  |  80 lines

  1. package javax.swing.plaf.basic;
  2.  
  3. import java.io.Serializable;
  4. import javax.swing.Icon;
  5.  
  6. public class BasicIconFactory implements Serializable {
  7.    private static Icon frame_icon;
  8.    private static Icon checkBoxIcon;
  9.    private static Icon radioButtonIcon;
  10.    private static Icon checkBoxMenuItemIcon;
  11.    private static Icon radioButtonMenuItemIcon;
  12.    private static Icon menuItemCheckIcon;
  13.    private static Icon menuItemArrowIcon;
  14.    private static Icon menuArrowIcon;
  15.  
  16.    public static Icon createEmptyFrameIcon() {
  17.       if (frame_icon == null) {
  18.          frame_icon = new EmptyFrameIcon();
  19.       }
  20.  
  21.       return frame_icon;
  22.    }
  23.  
  24.    public static Icon getCheckBoxIcon() {
  25.       if (checkBoxIcon == null) {
  26.          checkBoxIcon = new CheckBoxIcon();
  27.       }
  28.  
  29.       return checkBoxIcon;
  30.    }
  31.  
  32.    public static Icon getCheckBoxMenuItemIcon() {
  33.       if (checkBoxMenuItemIcon == null) {
  34.          checkBoxMenuItemIcon = new CheckBoxMenuItemIcon();
  35.       }
  36.  
  37.       return checkBoxMenuItemIcon;
  38.    }
  39.  
  40.    public static Icon getMenuArrowIcon() {
  41.       if (menuArrowIcon == null) {
  42.          menuArrowIcon = new MenuArrowIcon();
  43.       }
  44.  
  45.       return menuArrowIcon;
  46.    }
  47.  
  48.    public static Icon getMenuItemArrowIcon() {
  49.       if (menuItemArrowIcon == null) {
  50.          menuItemArrowIcon = new MenuItemArrowIcon();
  51.       }
  52.  
  53.       return menuItemArrowIcon;
  54.    }
  55.  
  56.    public static Icon getMenuItemCheckIcon() {
  57.       if (menuItemCheckIcon == null) {
  58.          menuItemCheckIcon = new MenuItemCheckIcon();
  59.       }
  60.  
  61.       return menuItemCheckIcon;
  62.    }
  63.  
  64.    public static Icon getRadioButtonIcon() {
  65.       if (radioButtonIcon == null) {
  66.          radioButtonIcon = new RadioButtonIcon();
  67.       }
  68.  
  69.       return radioButtonIcon;
  70.    }
  71.  
  72.    public static Icon getRadioButtonMenuItemIcon() {
  73.       if (radioButtonMenuItemIcon == null) {
  74.          radioButtonMenuItemIcon = new RadioButtonMenuItemIcon();
  75.       }
  76.  
  77.       return radioButtonMenuItemIcon;
  78.    }
  79. }
  80.